import axios from '@/utils/request'

// 查询
export function all() {
    return axios({
        url: '/students',
        method: 'get'
    })
}

// 删除
export function deleteById(id) {
    return axios({
        url: `/students/${id}`,
        method: 'delete'
    })
}

// 修改
export function update(id, dto) {
    return axios({
        url: `/students/${id}`,
        method: 'put',
        data: dto
    })
}

// 新增
export function insert(dto) {
    return axios({
        url: `/students`,
        method: 'post',
        data: dto
    })
}